#ifndef __LinuxNetObject__H__
#define __LinuxNetObject__H__

#include <QObject>
#include <QTimer>

QT_BEGIN_NAMESPACE
QT_END_NAMESPACE
class LinuxNetObject : public QObject
{
    Q_OBJECT
public:
    explicit LinuxNetObject(QObject *parent=nullptr);

    void setDevName(const QString &name);
    void start();
    void stop();

    static QStringList getDevNames();

signals:
    void updateNet(long upload, long download); 

private:
    QTimer timer;
    QString m_devname;

    long old_upload;
    long old_download;
};

#endif  //!__LinuxNetObject__H__